﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>    


		<head>
		<script type="text/javascript" src="<c:url value='/easyui/datagrid-detailview.js'/>"></script>
		<SCRIPT language=JAVASCRIPT src='<c:url value="/ckeditor/ckeditor.js"/>'></SCRIPT>
		<script type="text/javascript">
			$(function(){
				  init();
			});


			
			function init(){
				$('#t-dg').datagrid({
				loadMsg:'',
				view:detailview,
				detailFormatter:function(index,row){
				  var content = '';
          
          
          
          if (row.sysinfo_type)  {
   content += '<span style="color:blue;font-weight:700">公告类型：</span></br>';
   content += '<div style="padding:5px">'+ row.sysinfo_type.replace(/\r\n/gi,'<br/>')+'</div>';
}
if (row.unitname)  {
   content += '<span style="color:blue;font-weight:700">单位名称：</span></br>';
   content += '<div style="padding:5px">'+ row.unitname.replace(/\r\n/gi,'<br/>')+'</div>';
}
if (row.editdate)  {
   content += '<span style="color:blue;font-weight:700">录入时间：</span></br>';
   content += '<div style="padding:5px">'+ row.editdate.replace(/\r\n/gi,'<br/>')+'</div>';
}
if (row.context)  {
   content += '<span style="color:blue;font-weight:700">公告内容：</span></br>';
   content += '<div style="padding:5px">'+ row.context.replace(/\r\n/gi,'<br/>')+'</div>';
}
if (row.valid_time_hist)  {
   content += '<span style="color:blue;font-weight:700">失效时间：</span></br>';
   content += '<div style="padding:5px">'+ formatvalid_time_hist(row.valid_time_hist)+'</div>';
}
if (row.oper)  {
   content += '<span style="color:blue;font-weight:700">操作人员：</span></br>';
   content += '<div style="padding:5px">'+ row.oper.replace(/\r\n/gi,'<br/>')+'</div>';
}
           
					return '<div style="padding:5px">' + content + '</div>';
				}
				
			});
				
			}
			
			
			
			
			function formatpassflag(value){
				if (value == "-1") 
					return "未通过";
				if (value == "0") 
					return "通过";

				}
			
			function formatvalid_time_hist(value){
				switch(value){
				case '-1':
					return  "永不过期";
				case '3':
					return "三天";
				case '7':
					return "一周";
				case '31':
					return "一月";
				case '91':
					return "三月";
				case '182':
					return "半年";
				case '365':
					return "一年";
				}

				}
			
			function doQuery(value){
				$('#t-dg').datagrid('load', {
					q: value
				});
			}
			
		</script>
	</head>
	<body>
		<div class="easyui-layout" fit="true">
			<div region="north" border="false" style="height:40px;padding:5px;overflow:hidden;">
			<div style="padding-top:3px;float:left">
			<input class="easyui-searchbox" prompt="按公告类型|公告内容进行查询" searcher="doQuery" style="width:300px"></input>
  		</div>
	</div>
			
			
			<div region="center" border="true">
	      <table id="t-dg" style="display:none;"
						url="<c:url value='/read/Sysinfo/getSysinfoItems'/>"
						singleSelect="true" rownumbers="true" pagination="true"
						border="false" fit="true" fitColumns="true">
					<thead>
						<tr>
							<th field="sysinfo_type" width="100" sortable="true">公告类型</th>
<th field="unitname" width="100" sortable="true">单位名称</th>
<th field="editdate" width="100" sortable="true">录入时间</th>
<th field="context" width="100" sortable="false">公告内容</th>
<th field="valid_time_hist" width="100" sortable="false" formatter="formatvalid_time_hist">失效时间</th>
<th field="oper" width="100" sortable="false">操作人员</th>

						</tr>
					</thead>
				</table>			
			</div>
		</div>
		
		
		
			
		
		
		
		
	</body>
